//
//  VC_FogetPassword.m
//  yjw-winner
//
//  Created by 王春辉 on 2018/9/15.
//  Copyright © 2018年 Shanghai decade financial information service co., LTD. All rights reserved.
//

#import "VC_FogetPassword.h"
#import "VC_FogetPasswordSMS.h"

@interface VC_FogetPassword ()
@property (weak, nonatomic) IBOutlet UIButton *nextStepButton;
@property (weak, nonatomic) IBOutlet UITextField *phoneNumberTextField;
@property (weak, nonatomic) IBOutlet UITextField *codeTextField;
@property (weak, nonatomic) IBOutlet UIView *codeView;

@end

@implementation VC_FogetPassword

- (void)viewDidLoad {
    [super viewDidLoad];
    self.nextStepButton.layer.masksToBounds = YES;
    self.nextStepButton.layer.cornerRadius = 4.0f;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


#pragma mark --mark EVENT

- (IBAction)nextStepButtonClick:(UIButton *)sender {
    // 验证手机号 && 验证码
    // 跳转
    if ([self.phoneNumberTextField.text isAvailablePhoneNumber]) {
        VC_FogetPasswordSMS *vc = [[UIStoryboard storyboardWithName:@"LoginStoryBoard" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:NSStringFromClass([VC_FogetPasswordSMS class])];
        vc.phoneNumber = self.phoneNumberTextField.text;
        [self.navigationController pushViewController:vc animated:YES];
    }else {
        [MBProgressHUD showSuccess:@"请输入正确的手机号码"];
    }
}

@end
